/*
 * ========================================================
 * Copyright(c) 2014 杭州龙骞科技-版权所有
 * ========================================================
 * 本软件由杭州龙骞科技所有, 未经书面许可, 任何单位和个人不得以
 * 任何形式复制代码的部分或全部, 并以任何形式传播。
 * 公司网址
 * http://www.hzdracom.com/
 * ========================================================
 */
package com.shwread.android.ui.page;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.TextView;

import com.shwread.android.qysw.activity.MainActivity;
import com.shwread.android.qysw10000204.R;
import com.tgx.tina.android.ipc.framework.IUIPage;

import base.tina.core.task.infc.ITaskResult;
import logic.constants.DefaultConsts;


/**
 * 首页-我的
 * @author 刘宾  
 * @date 2015年11月26日 下午2:10:56
 */
public class MyPage
        extends
        AbstractUIPage<MainActivity>
{
	private static MyPage instance;
	public static MyPage getInstance(MainActivity t) {
		if (null == instance)
		{
			instance = new MyPage(t);
		}
		return instance;
	}
	public MyPage(MainActivity t) {
		super(t);
	}
	
	private TextView                      tvTitle;
	
	@Override
	public <E extends Activity> View createView(E arg0, int arg1) {
		if (null != curMyView) return curMyView;
		curMyView = bActivity.getLayoutInflater().inflate(R.layout.main_my_lay, null);
		initData();
		initView();
		return curMyView;
	}
	
	void initData() {
	}
	
	void initView() {
		tvTitle = (TextView) curMyView.findViewById(R.id.common_header_name);
		tvTitle.setText(bActivity.getResources().getString(R.string.maintab_interaction));
	}
	
	@Override
	public int enter(IUIPage<?> arg0) {
		return 0;
	}
	
	@Override
	public int leave(IUIPage<?> arg0) {
		return 0;
	}
	
	@Override
	public void notifyView(int arg0, Bundle arg1) {
		switch (arg0) {
			case DefaultConsts.UPDATEUI_SPLASH_DELAY_MILLIS:
				break;
		}
		
	}
	
	private Handler myHandler = new Handler()
	                          {
		                          @Override
		                          public void handleMessage(Message msg) {
			                          super.handleMessage(msg);
			                          int msgId = msg.what;
			                          switch (msgId) {
										  case 1:
											  break;
										  default:
											  break;
									  }
								  }
	                          };
	@Override
	public void setStatus(int arg0) {
		
	}
	
	@Override
	public View updateView(int arg0, ITaskResult arg1) {
		// TODO Auto-generated method stub
		return null;
	}
	
}
